﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using G_Class.Utils;

namespace ITExpert
{
    public partial class MasterEx1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Title Test!";

            Form.Controls.Add(new LiteralControl("<h2>Added String.</h2>"));
        }

        protected void btn1_Click(object sender, EventArgs e)
        {
            ///Label lbl = (Label)Master.FindControl("lblMaster1");
            Label lbl = (Label)CommonUtils.FindControlRecursive(this.Master.Master, "lblMaster1");

            //lbl.Text = Convert.ToDateTime("2001-02-02").ToString("yyyy년 MM월 dd일 dddd");
            //lbl.Text = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss.fff");


            if (lbl != null)
                lbl.Text = txt1.Text;


            if (Master == this.Controls[0])
                Response.Write("Master == this.Controls[0]");
            else
                Response.Write("Master != this.Controls[0]");
        }
    }
}